package com.kichina.galaxy.dev.tools.logic.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 测点协议表
 * </p>
 *
 * @author fanxioadiu
 * @since 2022-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class IotDevicePointProtocol extends Model<IotDevicePointProtocol> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 协议测点名
     */
    private String name="";

    /**
     * 测点唯一标识
     */
    private String pointKey="";

    /**
     * 发送公式
     */
    private String sendFormula="";

    /**
     * 接收公式
     */
    private String acceptFormula="";

    /**
     * 单位
     */
    private String unit="";

    /**
     * 协议设备id
     */
    private Long deviceProtocolId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 测点类型,0开关量，1变化量
     */
    private Integer pointType;

    /**
     * 测点值范围
     */
    private String pointValueRange="";

    /**
     * ali平台需要，0 数字   1 字符串
     */
    private Integer dataType;

    /**
     * 协议版本号
     */
    private String agreementVersion="";

    /**
     *
     * @return
     */
    @TableField(exist = false)
    private String productKey;

    @TableField(exist = false)
    private Integer maxValue;

    @TableField(exist = false)
    private Integer minValue;

    @TableField(exist = false)
    private Integer step;

    @TableField(exist = false)
    private Integer numUnit;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
